There are occasions in which a predetermined NC program is inputted to an automatic programming apparatus, a new NC program is created by subjecting the NC program to editing processing such as processing for adding, deleting or revising NC data, and the new program is delivered as an output. FIG. 5 is a view for describing a conventional NC program output method of this kind. An NC program is composed of a starting character string [e.g., %EOB (end of block)] indicating the beginning of NC data, a group of NC data and finally an end character string (e.g., %) indicating the end of NC data. There are cases where the starting character string differs depending upon the NC apparatus.
When an NC program PR is read in, an automatic programming apparatus skips the starting character string "%EOB", which is irrelevant to the operation of an NC apparatus, stores data from NC data D in an editing memory RAM, outputs the initially preset starting character string "%EOB" following application of predetermined editing processing such as editing, then outputs NC data D' from within the editing memory RAM, and finally outputs the end character string "%", thereby outputting a new NC program PR' which is the result of editing processing.
With this conventional NC program output method, however, the starting character string "%EOB" is inserted at the beginning of the NC program that will be outputted. Consequently, though no problems are encountered as far as an NC apparatus that regards "%EOB" as the starting character string of NC data is concerned, a problem does arise with respect to an NC apparatus that regards a different starting character string, e.g., "%PMEOB", as the starting character string, the problem being that this NC apparatus will not be capable of identifying the beginning of the NC data.
Accordingly, it has been considered to adopt an arrangement in which it is possible to set an automatic programming apparatus to any starting character string and, when the NC program is outputted, to output the set starting character string before the NC data. With this method, however, operation is troublesome because the starting character string conforming to the NC apparatus used must be set whenever an NC program is edited and outputted. Operation is particularly troublesome since a starting character string must be set even when there is agreement between a starting character string contained in an NC program inputted to an automatic programming apparatus and a starting character string of an NC apparatus that uses the edited NC program.